

			<div class="block">
			
				<div class="block_head">
					<div class="bheadl"></div>
					<div class="bheadr"></div>
					
					<h2>添加文章</h2>
					
					<form action="" method="post">
						<input type="text" class="text" value="Search" />
					</form>
				</div>		<!-- .block_head ends -->
				
				
				
				<div class="block_content">
				<form action="#" method="post" enctype="multipart/form-data">
						<p>
							<label>标题:</label><br />
							<input type="text" name="title" value="<?php echo isset($g['title'])?$g['title']:'';?>" class="text medium error" /> 
							<span class="note error"></span>
						</p>
						<p>
							<label>分类:</label> <br />					
							<select class="styled" name="category" style="height:30px; margin:5px 0px 5px 0; line-height:30px;">
							<option value="0">选择分类</option>
							<?php foreach($cat_list as $row):?>
								<?php if(isset($g['category']) && $g['category'] == $row['cid']): ?>						
									<option selected="selected" value="<?php echo $row['cid'];?>">
										<?php if($row['level'] >0): for($i=0;$i<$row['level'];$i++):?>
											-
											<?php endfor; endif; ?>
										<?php echo $row['cat_name'];?></option>
								<?php else: ?>
									<option value="<?php echo $row['cid'];?>">
										<?php if($row['level'] >0): for($i=0;$i<$row['level'];$i++):?>
											-
											<?php endfor; endif; ?>
										<?php echo $row['cat_name'];?></option>
								<?php endif; ?>
								<?php endforeach; ?>
							</select>
						</p>		
						<!--   上传图片  -->
						<div id="pic">
						<p>
							<input type="file" name="pic[]">
						</p>
						<p>
							<input type="file" name="pic[]">
						</p>
						</div>
						<p>
							<label>内容:</label><br />
							<script id="container" name="des" type="text/plain">
							    <?php echo isset($g['des'])?$g['des']:'';?>
							</script>
							<script type="text/javascript">
							    var editor = UE.getEditor('container')
							</script>
						</p>
						
						<p>
							<label>来源:</label><br>
							<input type="text" class="text small" value="<?php echo isset($g['source'])?$g['source']:'';?>" name="source"> 
							<span class="note"></span>
						</p>						
						<hr />
						
						<p>
							<input type="hidden" name="action" value="<?php echo isset($action)?$action:'add';?>">
							<input type="hidden" name="id" value="<?php echo isset($g['id'])?$g['id']:'';?>">
							<input type="submit" class="submit small" value="Submit" />
						</p>
					</form>
					
					
				</div>		<!-- .block_content ends -->
				
				<div class="bendl"></div>
				<div class="bendr"></div>
					
			</div>		<!-- .block ends -->
		
	
			
